<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
	<meta http-equiv="Cache-control" content="no-cache,no-store,must-revalidate" />
	<meta http-equiv="Pragma" content="no-cache" />
	<meta http-equiv="Expires" content="-1" />
	<meta name="renderer" content="webkit" />
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
	<title>扫码支付_{$config.title}</title>
	<!-- if $seo.keywords --><meta name="keywords" content="{$seo.keywords}" /><!-- /if -->
	<!-- if $seo.description --><meta name="description" content="{$seo.description}" /><!-- /if -->
	<meta name="toTop" content="true" />
	{$config.meta}
	<base href="{$sys.url}" />
	<link rel="stylesheet" type="text/css" href="static/bootstrap/{#css#}/bootstrap.min.css" />
	<link rel="stylesheet" type="text/css" href="static/fontawesome/{#css#}/font-awesome.min.css" />
	<link rel="stylesheet" type="text/css" href="{#css#}/artdialog.css" />
	<!-- if $config.favicon -->
	<link rel="shortcut icon" href="{$config.favicon}" />
	<!-- /if -->
	<script type="text/javascript" src="{url ctrl=js ext=jquery.artdialog/}" charset="utf-8"></script>
</head>
<body>
<div class="container">
	<div class="m-4 p-4 text-center">
		<div class="p-2"><img src="api.php?f=qrcode&data={func rawurlencode $qrcode_url}" /></div>
		<div class="text-center">
			<!-- if $payment_method == 'fixed' -->
			请打开支付宝或微信进行扫一扫
			<!-- elseif $payment_method == 'alipay' -->
			请打开支付宝进行扫一扫
			<!-- else -->
			请打开微信进行扫一扫
			<!-- /if -->
		</div>
		<div class="text-center p-2">
			<a href="{url ctrl=order func=show sn=$order.id/}" type="button" class="btn btn-danger">取消支付</a>
		</div>
	</div>
</div>
<input type="hidden" name="sn" id="sn" value="{$sn}" />
<input type="hidden" name="logid" id="logid" value="{$order.id}" />
<script type="text/javascript">
function pending()
{
	var url = api_url('payment','query','sn='+$("#sn").val());
	$.phpok.json(url,function(data){
		if(data.status){
			url = get_url('payment','show','id='+$("#logid").val());
			$.phpok.go(url);
			return true;
		}
		window.setTimeout("pending()", 5000);
	})
}
$(document).ready(function(){
	window.setTimeout("pending()", 7000);
});

//禁止后退
history.pushState(null, null, document.URL);
window.addEventListener('popstate', function () {
    history.pushState(null, null, document.URL);
});
</script>
</body>
</html>